<div class="row-fluid">
    <div class="span12">
        <h3 class="heading">Registro de Nuevo Alumno</h3>    
        <?php echo $this->Form->create('Alumno', array('id' => 'AlumnoNuevoForm')); ?>                   



        <div class="tabbable tabbable-bordered">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#tab_br1" data-toggle="tab">Datos Generales</a></li>
                <li><a href="#tab_br2" data-toggle="tab">Inscripcion</a></li>
                <li><a href="#tab_br3" data-toggle="tab">Plan</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="tab_br1">

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span8">
                                <label>Nombre <span class="f_req">*</span></label>
                                <?php echo $this->Form->text('nombre', array('class' => 'span12', 'required')); ?>
                            </div>            
                        </div>
                    </div>   

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Apellido Paterno </label>
                                <?php echo $this->Form->text('ap_paterno', array('class' => 'span12','class' => 'span12', 'required')); ?>
                            </div>
                            <div class="span4">
                                <label>Apellido Materno </label>
                                <?php echo $this->Form->text('ap_materno', array('class' => 'span12')); ?>
                            </div>
                        </div>
                    </div>

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Fecha de Nacimiento <span class="f_req">*</span></label>
                                <?php //echo $this->Form->text('fecha_nacimiento', array('class' => 'span4', 'id' => 'dp1')); ?>
                                <?php echo $this->Form->text('fecha_nacimiento', array('class' => 'span4', 'id' => 'fecha','class' => 'span12', 'required')); ?>                
                            </div>                
                            <div class="span4">
                                <label><span class="error_placement">Genero</span> <span class="f_req">*</span></label>
                                <label class="radio inline">
                                    <input type="radio" value="M" name="data[Alumno][genero]" checked="checked" />
                                    Masculino
                                </label>
                                <label class="radio inline">
                                    <input type="radio" value="F" name="data[Alumno][genero]" />
                                    Femenino
                                </label>
                            </div>               
                        </div>
                    </div>

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Telefono</label>
                                <?php echo $this->Form->text('telefono', array('class' => 'span12','class' => 'span12', 'required')); ?>
                            </div>
                            <div class="span4">
                                <label>Email</label>
                                <?php echo $this->Form->text('email', array('class' => 'span12')); ?>
                            </div>
                        </div>
                    </div>

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span8">
                                <label>Direccion </label>
                                <?php echo $this->Form->text('direccion', array('class' => 'span12')); ?>
                            </div>            
                        </div>
                    </div>

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span8">
                                <label>Observaciones </label>
                                <!--
                    <textarea name="reg_your_message" id="reg_your_message" cols="10" rows="3" class="span8"></textarea>
                                -->
                                <?php echo $this->Form->textarea('observacion', array('cols' => 10, 'rows' => 3, 'class' => 'span8')); ?>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="tab-pane" id="tab_br2">

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Seleccione Curso <span class="f_req">*</span></label>
                                <?php echo $this->Form->select('AlumnosParalelo.nivele_id', $dcn, array('id'=>'AlumnosParaleloCurso', 'class' => 'span12', 'required')); ?>
                            </div>            
                        </div>
                    </div> 

                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">                                                                                                  
                                <label>Seleccione Paralelo</label>
                                <div id="cargaParalelos"> 
                                    <select>
                                        <option> </option>                                    
                                    </select>                                
                                </div>
                            </div>            
                        </div>
                    </div> 

                </div>
                <div class="tab-pane" id="tab_br3">
                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Seleccione Plan <span class="f_req">*</span></label>
                                <?php echo $this->Form->select('AlumnosPlanespago.planespago_id', $planes, array('class' => 'span12', 'required')); ?>
                            </div>            
                        </div>
                    </div>
                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Seleccione gesti&oacute;n <span class="f_req">*</span></label>
                                <?php echo $this->Form->select('AlumnosPlanespago.gestion', $gestiones, array('class' => 'span12', 'required')); ?>
                            </div>            
                        </div>
                    </div>
                    <div class="formSep">
                        <div class="row-fluid">
                            <div class="span4">
                                <label>Observaciones <span class="f_req">*</span></label>
                                <?php echo $this->Form->textarea('AlumnosPlanespago.observaciones', $gestiones, array('class' => 'span12')); ?>
                            </div>            
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="form-actions">
            <button class="btn btn-success" type="submit">Guardar nuevo alumno</button>        
        </div>   
        </form>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $("#fecha").inputmask("d/m/y",{ "placeholder": "dd/mm/aaaa" });
        $("#AlumnosParaleloCurso").change(function(){
            
            $("#cargaParalelos").load('ajaxparalelosinscribe/'+$(this).val());
            console.log($(this).val());
        });
    });
</script>
<!-- sidebar -->
<?php echo $this->element('sidebar/alumnos'); ?>
<!-- fin sidebar -->
<?php //llamamos scripts tablas ?>
<?php echo $this->element('jsformularios'); ?>